The image to flip
An input range that returns value for each pixel in the image
import std.experimental.color; enum RGB8 TheColor = RGB8(78, 82, 11); MyTestImage!RGB8 test = new MyTestImage!RGB8(2, 2); test.fillOn(TheColor); final class Foo { MyTestImage!RGB8 value; alias value this; this(MyTestImage!RGB8 value) { this.value = value; } } size_t count; foreach(pixel; flipVerticalRange(test)) { assert(pixel.value == TheColor); count++; } assert(count == 4); count = 0; foreach(pixel; flipVerticalRange(test).flipVerticalRange()) { assert(pixel.value == TheColor); count++; } assert(count == 4);
Flips an image horizontally